Release 10.1A: OpenEdge Development:
Progress 4GL Reference
/ Division operator
Divides one numeric expression by another numeric expression, producing a decimal result.
Syntax
expressionAn expression that evaluates to a numeric value.
ExampleThis procedure divides the number of items allocated by the number of items on hand, producing a decimal value. The multiplication operator (*) converts that decimal value to a percentage.
Notes
- Progress always performs division as a decimal operation (the product of 5 / 2 is 2.5, not 2). If you assign the result to an integer field, Progress rounds the decimal to make the assignment. When you want Progress to truncate a quotient to an integer, use the TRUNCATE function (TRUNCATE(5 / 2, 0) is 2).
- The result of dividing a number by 0 is the Unknown value (
?), and Progress does not display an error message.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |